
import React from 'react';
import { ReactSVG } from 'react-svg';


function Demo (props){
    const ele = <li>这是内容{props.name}</li>
    return ele
}

class List extends React.Component{

    state = {
        name: '小李',
        age: 8
    }

    render(){
        return(
            <div>
                <ul>
                    {
                        [1,2,3,4,5].map((v, i) => {
                              let prpos = {
                                  name:'[效力]'+i,
                                  box: i,
                                  text: '文本信息'
                              }
                            // eslint-disable-next-line react/jsx-no-undef
                              return <Demo {...prpos} key={v} />
                            }
                        )
                    }
                </ul>
                <h1>列表信息展示</h1>
                <p>测试</p>
                <ReactSVG src="./text.svg"/>
            </div>
        )
    }
}

export default List;